<?php
class TaskItem extends AppModel {
	var $name = 'TaskItem';
	
	var $belongsTo = array(
		'TypeItem' => array(
			'className'  	=> 'TypeItem',
			'foreignKey'    => 'type_items_id'
			)
	);
	
	function deleteItemsByTaskId ($id) {
		$sql = 'DELETE FROM task_items where tasks_id='.$id;
		
		return $this->query($sql);
	}
}
?>